package com.ruoyi.common.utils;

public class PushResult {
    private final boolean success;
    private final String errorMsg;

    private PushResult(boolean success, String errorMsg) {
        this.success = success;
        this.errorMsg = errorMsg;
    }

    public static PushResult success() {
        return new PushResult(true, null);
    }

    public static PushResult success(String msg) {
        return new PushResult(true, msg);
    }

    public static PushResult failure(String errorMsg) {
        return new PushResult(false, errorMsg);
    }

    public boolean isSuccess() { return success; }
    public String getErrorMsg() { return errorMsg; }
}
